package com.wisdytech.linkdcs.equipLifeCycle.check.service.impl;

import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wisdytech.common.exception.ServiceException;
import com.wisdytech.common.handler.BaseService;
import com.wisdytech.linkdcs.equipLifeCycle.check.dao.ICheckDetailRecordDao;
import com.wisdytech.linkdcs.equipLifeCycle.check.model.CheckDetailRecord;
import com.wisdytech.linkdcs.equipLifeCycle.check.service.ICheckDetailRecordService;
import com.wisdytech.linkdcs.equipLifeCycle.check.vo.CheckRecordDetailVo;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author dailibo
 * @since 2018-06-05
 */
@Service
@Transactional
public class CheckDetailRecordServiceImpl extends BaseService<ICheckDetailRecordDao, CheckDetailRecord> implements ICheckDetailRecordService {


	@Autowired
	private ICheckDetailRecordDao iCheckDetailRecordDao;
	
	@Override
	public List<CheckRecordDetailVo> getCheckDetail(String checkId) {
		
		if(StringUtils.isBlank(checkId)) {
			throw new ServiceException("设备点检表id 为空");
		}
		//根据设备点检表关联查出modelid
		
		return iCheckDetailRecordDao.selectDetailByCheckRecordId(checkId);
	}
}
